/**
 * All right reserved@Raygo 2022~2030
 */
package com.raygo.jfxdemo.view;

/**
 * 测试类
 *
 * @author Raygo
 * @since 2022年3月5日
 */
public class Person {
    private String name;
    private int age;
    private String country = "中国";
    private String city = "北京";

    public Person(String name, int age) {
        this.setName(name);
        this.age = age;
    }

    public Person(String name, int age, String country, String city) {
        this.setName(name);
        this.age = age;
        this.country = country;
        this.city = city;
    }

    @Override
    public String toString() {
        return name + " is " + String.valueOf(age);
    }

    /**
     * Get country value
     *
     * @return the country
     */
    public String getCountry() {
        return country;
    }

    /**
     * Set country to country
     *
     * @param country the country to set
     */
    public void setCountry(String country) {
        this.country = country;
    }

    /**
     * Get city value
     *
     * @return the city
     */
    public String getCity() {
        return city;
    }

    /**
     * Set city to city
     *
     * @param city the city to set
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * Get age value
     *
     * @return the age
     */
    public String getAge() {
        return String.valueOf(age);
    }

    /**
     * Set age to age
     *
     * @param age the age to set
     */
    public void setAge(String age) {
        this.age = Integer.parseInt(age);
    }

    /**
     * Get name value
     *
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Set name to name
     *
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
}
